<?php
/**
 * Created by PhpStorm.
 * User: harlen
 * Date: 2017/2/10 0010
 * Time: 10:51
 */

namespace app\admin\model;

use think\Model;
use traits\model\SoftDelete;

class Files extends Model
{
    //引入软删除trait 和 定义软删除字段
    use SoftDelete;
    protected $deleteTime = 'delete_time';

    protected $name = 'file';
    protected $insert = ['create_time'];

    /**
     * 自动完成- 插入时自动填写创建时间
     * @return unix_timestamp
     */
    protected function setCreateTimeAttr()
    {
        return time();
    }
}